package com.zsc.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zsc.dto.ShoppingCartDTO;
import com.zsc.dto.ShoppingCartPageQueryDTO;
import com.zsc.entity.ShoppingCart;
import com.zsc.result.PageResult;

/**
 * @author cjr165123050
 * @description 针对表【shopping_cart(购物车)】的数据库操作Service
 * @createDate 2024-05-19 11:01:52
 */
public interface ShoppingCartService extends IService<ShoppingCart> {

    /**
     * 查看购物车
     *
     * @return
     */
    PageResult showShoppingCart(ShoppingCartPageQueryDTO shoppingCartPageQueryDTO);

    /**
     * 新增/添加 菜品/套餐 至购物车
     *
     * @param shoppingCartDTO
     */
    void addShoppingCart(ShoppingCartDTO shoppingCartDTO);

    /**
     * 减少/删除 菜品/套餐 至购物车
     *
     * @param shoppingCartDTO
     */
    void subShoppingCart(ShoppingCartDTO shoppingCartDTO);

    /**
     * 清空购物车
     */
    void cleanShoppingCart();
}
